package com.renren.api.connect.android.example;

import com.renren.api.connect.android.Util;
import com.renren.api.connect.android.exception.RenrenError;
import com.renren.api.connect.android.view.RenrenFeedListener;

/**
 * @author 李勇(yong.li@opi-corp.com) 2010-7-19
 */
public class PostFeedListener implements RenrenFeedListener {

    private Example example;

    PostFeedListener(Example example) {
        this.example = example;
    }

    @Override
    public void onComplete() {
        Util.showAlert(example, "Feed Complete 提示", "发新鲜事完成");
    }

    @Override
    public void onCancel() {
        Util.showAlert(example, "Feed Cancel 提示", "用户放弃发新鲜事");
    }

    @Override
    public void onRenrenError(RenrenError renrenError) {
        Util.showAlert(example, "Feed RenrenError 提示", "RenrenError:" + renrenError);
    }

    @Override
    public void onError(Exception exception) {
        Util.showAlert(example, "Feed Error 提示", exception.getMessage());
    }
}
